package com.mobilous.client.MainScreen;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.HasAllMouseHandlers;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.event.dom.client.MouseDownEvent;
import com.google.gwt.event.dom.client.MouseDownHandler;
import com.google.gwt.event.dom.client.MouseMoveEvent;
import com.google.gwt.event.dom.client.MouseMoveHandler;
import com.google.gwt.event.dom.client.MouseOutEvent;
import com.google.gwt.event.dom.client.MouseOutHandler;
import com.google.gwt.event.dom.client.MouseOverEvent;
import com.google.gwt.event.dom.client.MouseOverHandler;
import com.google.gwt.event.dom.client.MouseUpEvent;
import com.google.gwt.event.dom.client.MouseUpHandler;
import com.google.gwt.event.dom.client.MouseWheelEvent;
import com.google.gwt.event.dom.client.MouseWheelHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

public class IconFile extends Composite implements HasAllMouseHandlers, HasClickHandlers {
	   public HandlerRegistration addClickHandler(ClickHandler handler) {
	        return addDomHandler(handler, ClickEvent.getType());
	      }

	      public HandlerRegistration addMouseDownHandler(MouseDownHandler handler) {
	          return addDomHandler(handler, MouseDownEvent.getType());
	      }

	      public HandlerRegistration addMouseMoveHandler(MouseMoveHandler handler) {
	        return addDomHandler(handler, MouseMoveEvent.getType());
	      }

	      public HandlerRegistration addMouseOutHandler(MouseOutHandler handler) {
	        return addDomHandler(handler, MouseOutEvent.getType());
	      }

	      public HandlerRegistration addMouseOverHandler(MouseOverHandler handler) {
	        return addDomHandler(handler, MouseOverEvent.getType());
	      }

	      public HandlerRegistration addMouseUpHandler(MouseUpHandler handler) {
	        return addDomHandler(handler, MouseUpEvent.getType());
	      }

	      public HandlerRegistration addMouseWheelHandler(MouseWheelHandler handler) {
	        return addDomHandler(handler, MouseWheelEvent.getType());
	      }
	      
	public IconFile(String imagename,String Text) {
		
		VerticalPanel verticalPanel = new VerticalPanel();
		verticalPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
		initWidget(verticalPanel);
		verticalPanel.setSize("48px", "48px");
		
		Image image = new Image(imagename);
		image.setStyleName("gwt-Image-page warning");
		verticalPanel.add(image);
		
		Label lblAppName = new Label(Text);
		verticalPanel.add(lblAppName);
	}

}
